import { lazy } from "react"

const routes = [
    {
        path: '/home',
        component: lazy(() => import('../views/home/Index')),
        children: [
            {
                path: '/home/index',
                component: lazy(() => import('../views/home/index/Index'))
            },
            {
                path: '/home/class',
                component: lazy(() => import('../views/home/class/Class'))
            },
            {
                path: '/home/car',
                component: lazy(() => import('../views/home/car/Car'))
            },
            {
                path: '/home/my',
                component: lazy(() => import('../views/home/my/My'))
            },
            {
                path: '/home',
                to: '/home/index'
            },
        ]
    },
    {
        path: '/login',
        component: lazy(() => import('../views/login/Login'))
    },
    {
        path: '/detile/:id',
        component: lazy(() => import('../components/Detile'))
    },
    {
        path: '/registry',
        component: lazy(() => import('../views/registry/Registry'))
    },
    {
        path: '/',
        to: '/home'
    },
]

export default routes